<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

<script>

// 模板字符串使用反引号表示 ``
// 1.模板字符串内部可以换行
let str1 = `123
           456
           789`;

// 2.模板字符串内部可以使用${}插入变量 
let str2 = 'hello';
function sum(a,b){
    return a+b;
}
console.log( str2 + ' world' );// 'hello world'
console.log( `${str2} world` );// 'hello world'
console.log( `2+3=${sum(2,3)}` );// '2+3=5'

</script>
</body>
</html>